using System.Collections.Generic;

namespace EventLogMailer
{
    public class MailerConfiguration
    {
        private readonly List<string> monitoredEventLogs = new List<string>();

        public MailerConfiguration()
        {
        }

        public List<string> MonitoredEventLogs
        {
            get { return this.monitoredEventLogs; }
        }

        private readonly List<MailRule> rules = new List<MailRule>();

        public List<MailRule> Rules
        {
            get { return this.rules; }
        }

        // sending emails interval in seconds
        public int SendingPause { get; set; }

        public static MailerConfiguration CreateDefault()
        {
            return new MailerConfiguration
                {
                    MonitoredEventLogs = { "Application" },
                    Rules =
                        {
                            new MailRule("miroslaw.jedynak@makingwaves.pl", ".*")
                        },
                    SendingPause = 300
                };
        }
    }
}